#include<stdio.h>
void printall(int a[][10])
{
	int i, j;
	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= 9; j++)
			printf("%d*%d=%-4d", i, j, a[i][j]);
		printf("\n");
	}
}
void printdao(int a[][10])
{
	int i, j;
	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= i; j++)
			printf("%d*%d=%-4d", i, j, a[i][j]);
		printf("\n");
	}
}
int main(void)
{
	int i, j;
	int choice;
	int Nine[10][10] = { 0 };
	for (i = 1; i <= 9; i++)
		for (j = 1; j <= 9; j++)
			Nine[j][i] = i * j;
	printf("1 \n");
	printf("2 \n");
	scanf_s("%d", &choice);
	switch (choice)
	{
	case 1:printall(Nine); break;
	case 2:printdao(Nine); break;
	default:printf("Error input!");
     }


}